<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        table {
            border-collapse: collapse;
            margin: 0px auto 0px auto;
        }

        table th, td {
            border: 1px solid black;
            text-align: center;
        }
    </style>

</head>
<body style="text-align: center">
  <h1>目标页面</h1>
  <table>
      <tr>
          <th>ID</th>
          <th>NAME</th>
          <th>SALARY</th>
      </tr>

      <tbody th:if="${#lists.isEmpty(pageInfo.list)}">
        <tr>
            <td>抱歉没有查询到数据</td>
        </tr>
      </tbody>

      <tbody th:if="${not #lists.isEmpty(pageInfo.list)}">
          <tr th:each="emp : ${pageInfo.list}">
              <td th:text="${emp.empId}">这里显示员工ID</td>
              <td th:text="${emp.empName}">这里显示员工NAME</td>
              <td th:text="${emp.empSalary}">这里显示员工SALARY</td>
          </tr>
          <tr>
              <td colspan="3">
                  <span th:if="${pageInfo.hasPreviousPage}">
                      <a th:href="@{/get/page/1}">首页</a>
                      <a th:href="@{/get/page/}+${pageInfo.prePage}">上一页</a>
                  </span>

                  <span th:each="navigator : ${pageInfo.navigatepageNums}">
                      <a th:if="${pageInfo.pageNum != navigator} "
                         th:href="@{/get/page/}+${navigator}"
                         th:text="'['+${navigator}+']'">不是当前页</a>
                      <span th:if="${pageInfo.pageNum == navigator}"
                            th:text="'['+${navigator}+']'">是当前页</span>
                  </span>
                  <!-- <span th:text="${pageInfo.pageNum}+'/'+${pageInfo.pages}">当前页</span> -->

                  <span th:if="${pageInfo.hasNextPage}">
                      <a th:href="@{/get/page/}+${pageInfo.nextPage}">下一页</a>
                      <a th:href="@{/get/page/}+${pageInfo.pages}">最后一页</a>
                  </span>
              </td>
          </tr>
      </tbody>
  </table>
  <a th:href="@{/}">回首页</a>
</body>
</html>